package com.yuchao.springboot.service.impl;

import com.yuchao.springboot.dto.OrderDTO;
import com.yuchao.springboot.service.IOrderService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;

/**
 * @description: 传统实现
 * @author: xingyuchao
 * @date: 2019-11-07
 */
@Service("orderServiceImpl")
public class OrderServiceImpl implements IOrderService {


    @Override
    public String handle(OrderDTO dto) {

        String type = dto.getType();

        if(StringUtils.equals(type,"1")){
            return "处理普通订单";
        }else if(StringUtils.equals(type,"2")){
            return "处理团购订单";
        }else if(StringUtils.equals(type,"3")){
            return "处理促销订单";
        }
        return null;
    }
}
